#pragma once
#include <typescommon.h>
// inputstring is struct protocolPackageCommonInform
// inputsize input:command package size, out:responce size

typedef int (*hashCommandCallback)(void *inputstring, uint32_t *inputsize, void *userdata);
struct hashCommandActuatorInform
{
    hashCommandCallback callbackFunction;
    void *userdata;
};
struct hashCommandActuatorManage
{
    // hash command buffer, for hash find command callback
    struct hashCommandActuatorInform *commandHash;
    // hash command callback buffer size
    uint32_t hashSize;
};

int hashCommandActuatorInit(struct hashCommandActuatorManage *atcMng, struct hashCommandActuatorInform *atcBufferSet, uint32_t atcSizeSet);
int hashCommandActuatorRun(struct hashCommandActuatorManage *atcMng, uint32_t commandId, void *inputstring, uint32_t *inputsize);
// int hashCommandActuatorDirect(hashCommandCallback *commandlist, uint32_t commandsize, uint32_t commandId,
//                                void *inputstring, uint32_t inputsize, void *userdata);